package com.xk.school_device.controller;

import com.xk.school_device.common.Result;
import com.xk.school_device.entity.Purchases;
import com.xk.school_device.service.IPurchasesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xk
 * @since 2025-04-16
 */
@RestController
@RequestMapping("/purchases")
public class PurchasesController {
    @Autowired
    private IPurchasesService purchasesService;

    /**
     * 申请采购名单
     */
    @PostMapping("/register")
    public Result register(Purchases purchases) {
         purchasesService.save(purchases);
        return Result.success("申请采购名单成功");
    }



}
